package com.ai.bayesi.model;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Main {
    public static void main(String[] args) {
        MoodPredictor predictor = new MoodPredictor();
        
        // 设置证据
        Map<String, String> evidence = new HashMap<String, String>();
        evidence.put("天气", "晴天");
        evidence.put("工作压力", "低");
        evidence.put("睡眠质量", "好");
        evidence.put("社交活动", "活跃");

        // 预测心情
        double probability = predictor.predictGoodMood(evidence);
        System.out.printf("在当前条件下，心情好的概率为: %.2f%%\n", probability * 100);
        
        // 测试所有可能的证据组合
        System.out.println("\n测试所有证据组合:");
        List<Map<String, String>> allCombinations = predictor.getAllPossibleEvidenceCombinations();
        for (Map<String, String> combo : allCombinations) {
            double prob = predictor.predictGoodMood(combo);
            System.out.printf("%s →\t心情好概率:\t\t %.1f%%\n", combo, prob * 100);
        }
        System.out.println(allCombinations.size());
    }
}